<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/jquery.min.js"></script>
</head>
<body>
<div>
    发送给：<input type="text" id="to" name="to" value="130444226@qq.com">
</div>
<div>
    主题：<input type="text" id="subject" name="subject">
</div>
<div>
    内容：<input type="text" id="content" name="content">
</div>
<div><input type="button" value="提交" onclick="save()"></div>
<div><input type="button" value="查看es数据" onclick="searchES()"></div>
<div><input type="button" value="查看队列信息" onclick="searchMQ()"></div>
<script>
    function save() {
        $.ajax({
            url: '/simpleMailMessage',
            data: {
                to: $("#to").val(),
                subject: $("#subject").val(),
                content: $("#content").val()
            },
            type: 'post',
            dataType: 'json',
            success: function (data) {
                console.log(data);
            }
        })
    }

    function searchES() {
        $.ajax({
            url: '/searchES',
            data: {
                to: $("#to").val(),
                subject: $("#subject").val(),
                content: $("#content").val()
            },
            type: 'post',
            dataType: 'json',
            success: function (data) {
                console.log(data);
            }
        })
    }
    function searchMQ() {
        $.ajax({
            url: '/searchMQ',
            data: {
                to: $("#to").val(),
                subject: $("#subject").val(),
                content: $("#content").val()
            },
            type: 'post',
            dataType: 'json',
            success: function (data) {
                console.log(data);
            }
        })
    }
</script>
</body>
</html>